package com.example.module_login

import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.blankj.utilcode.util.ToastUtils
import com.example.lib_common.view.view.BaseMvvmActivity
import com.example.module_login.databinding.ActivityLogin2Binding
import com.example.module_main.MainActivity
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class LoginActivity : BaseMvvmActivity<ActivityLogin2Binding>() {
    override fun getLayoutId(): Int =R.layout.activity_login2

    override fun initViews() {
        mDataBinding.btnLogin.setOnClickListener{
            val username = mDataBinding.loginUname.text.toString()
            val upass =mDataBinding.loginPass.text.toString()
            if(username.isNullOrEmpty()|| upass.isNullOrEmpty()){
                ToastUtils.showLong("输入不能为空")
                return@setOnClickListener
            }
            val intent = Intent(this, MainActivity::class.java)
            startActivity(intent)


        }
    }

    override fun getActivityState(state: Bundle) {

    }

    override fun saveActivityState(outState: Bundle) {

    }

}